#include "SMPPUserResponseCode.hpp"

using namespace smpp::pdu;

UserResponseCode::UserResponseCode(const quint8 nValue):
TLV(TLVtags::TAG_USER_RESPONSE_CODE,1),_Value(nValue){}

UserResponseCode::UserResponseCode(
const UserResponseCode &nUserResponseCode):
TLV(nUserResponseCode),_Value(nUserResponseCode.getValue()){}

bool UserResponseCode::operator ==(
	const UserResponseCode &nUserResponseCode) const{
	return (TLV::operator == (nUserResponseCode) && 
			_Value == nUserResponseCode.getValue());
}

bool UserResponseCode::operator !=(
	const UserResponseCode &nUserResponseCode) const{
	return !this->operator == (nUserResponseCode);
}

UserResponseCode &UserResponseCode::operator = (
	const UserResponseCode &nUserResponseCode){
	if(*this == nUserResponseCode)
		return *this;
	TLV::operator = (nUserResponseCode);
	_Value = nUserResponseCode.getValue();
	return *this;
}

void UserResponseCode::setValue(const quint8 nValue){
	_Value = nValue;
}

const quint8 UserResponseCode::getValue() const{
	return _Value;
}
